package indi.flynn.factorypattern.abstractfactory;

import indi.flynn.factorypattern.Pizza;
import indi.flynn.factorypattern.app.NYCheesePizza;
import indi.flynn.factorypattern.app.NYPepperPizza;

public class NYFactory implements AbstractFactory {

	@Override
	public Pizza CreatePizza(String ordertype) {
		Pizza pizza = null;
		if (ordertype.equals("cheese")) {
			pizza = new NYCheesePizza();
		} else if (ordertype.equals("pepper")) {
			pizza = new NYPepperPizza();
		}
		return pizza;
	}

}
